package com.ljs.liojbackendquestionservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ljs.libackendmodel.model.dto.questionsubmit.QuestionQuerySubmitRequest;
import com.ljs.libackendmodel.model.dto.questionsubmit.QuestionSubmitAddRequest;
import com.ljs.libackendmodel.model.entity.QuestionSubmit;
import com.ljs.libackendmodel.model.entity.User;
import com.ljs.libackendmodel.model.vo.QuestionSubmitVO;

/**
* @author 李
* @description 针对表【question_submit(题目提交表)】的数据库操作Service
* @createDate 2025-02-06 16:19:00
*/
public interface QuestionSubmitService extends IService<QuestionSubmit> {
    /**
     * 提交
     *
     * @param questionSubmitAddRequest
     * @param loginUser
     * @return 记交记录的ID
     */
    Long doQuestionSubmit(QuestionSubmitAddRequest questionSubmitAddRequest, User loginUser);

    /**
     * 获取查询条件
     *
     * @param questionQuerySubmitRequest
     * @return
     */
    QueryWrapper<QuestionSubmit> getQueryWrapper(QuestionQuerySubmitRequest questionQuerySubmitRequest);



    /**
     * 获取题目封装
     *
     * @param questionSubmit
     * @param loginUser
     * @return
     */
    QuestionSubmitVO getQuestionSubmitVO(QuestionSubmit questionSubmit, User loginUser);

    /**
     * 分页获取题目封装
     * @param questionSubmit
     * @param loginUser
     * @return
     */
    Page<QuestionSubmitVO> getQuestionVOPage(Page<QuestionSubmit> questionSubmit, User loginUser);

}
